<template>
  <div id="category">
    <ul>
      <li @click="jump" v-for="item in categoryData1" v-bind:key="item.id">{{item.name}}</li>
      <!-- v-cloak防止页面闪烁 -->
      <li v-if="categoryData1.length === 0" v-cloak>无数据</li>
    </ul>
  </div>
</template>

<script>
export default {
  props: ['categoryData'],
  name: 'Category',
  data () {
    return {
      categoryData1: this.categoryData || []
    }
  },
  methods: {
    jump: function () {
      this.$router.push({
        path: 'introduction',
        params: ''
      })
    }
  }
}
</script>

<style>

</style>
